Feature: 作为一个律团用户
我可以拥有一个律团的账号
这样我就可以看到受保护的页面

Background:
Given a user exists with:
| username    | password |
| 13702325511 | 123456   |

Scenario: 成功登录
Given http "accept" header is "application/json"
And I make a "post" request to "login" with:
| username    | password |
| 13702325511 | 123456   |
Then the response status code should be 200
And the response is in "json" format
And I see elements in the response:
| element_name |
| token        |
| data         |
| status_code  |

Scenario: 登录失败
Given http "accept" header is "application/json"
And I make a "post" request to "login" with:
| username    | password |
| 13702325000 | 123456   |
Then the response status code should be 400
And the response is in "json" format
And print last response
And I see elements in the response:
| element_name   |
| error_messages |
| status_code    |
And print last response
And I see error for "password" field "账号或密码错误，请重新登录。"

    